﻿using System.Windows.Media;

namespace VideoTools.vo
{
    public class ThemeColor
    {
        public string? Key { get; set; }

        public System.Windows.Media.Brush? Value { get; set; }

        public string? StringValue { get; set; }

        public ThemeColor(string? key, object? value)
        {

            this.Key = key;

            this.Value = value switch
            {
                System.Windows.Media.Color color => new SolidColorBrush(color),
                System.Windows.Media.Brush brush => brush,
                _ => null
            };

            this.StringValue = value?.ToString();
        }

        public override string ToString()
        {
            return $"{Key}\t{StringValue}";
        }
    }
}
